{extend name="Public:base"/}

{block name="main"}
<div class="box-info">
    <div class="table-toolbar">
        <a class="btn btn-primary" href="{:U('Shipping/add')}"> 新增</a>
        <button type="button" class="btn btn-primary" onclick="myform.action='{:U('Shipping/deleteall')}';return confirm_deleteall()">删除</button>
        <button type="button" class="btn btn-primary" onclick="myform.action='{:U('Shipping/listorder')}';$('#myform').submit();" >排序</button>
    </div>

    <form action="" name="myform" id="myform" method="post">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th width="40">
                    <input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');">
                </th>
                <th width="50">排序</th>
                <th width="30">ID</th>
                <th>名称</th>
                <th>状态</th>
                <th width="150">操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name="list" id="vo"}
            <tr>
                <td width="40" align="center">
                    <input class="inputcheckbox " name="ids[]" value="{$vo['id']}" type="checkbox" >
                </td>
                <td width="40" align='center'>
                    <input name='listorders[{$vo.id}]' type='text' size='3' value='{$vo.listorder}' class='input-c'></td>
                <td width="30" align="center">{$vo['id']}</td>
                <td>{$vo['name']}</td>
                <td>
                    {eq name="vo.status" value="1"}
                    <a href=""><i class="fa fa-check text-success"></i></a>
                    {else/}
                    <a href="javascript:;"><i class="fa fa-ban text-danger"></i></a>
                    {/eq}
                </td>
                <td>
                    <a class="btn btn-sm btn-primary" href="{:U('Shipping/edit',array('id'=>$vo['id'],isajax=>1))}">编辑</a>
                    <a class="btn btn-sm btn-danger" href="javascript:confirm_delete('{:U('Shipping/delete',array(id=>$vo['id']))}')">删除</a>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
    </form>
    <div class="pagination">{$page}</div>
</div>
{/block}